<?php
$share_title = $view->settings['facebook_like_title'];
$share_description = $view->settings['facebook_like_text'];
$redirectURL = "?uid={$view->config['user_id']}&key={$view->config['key']}";
if($view->fb_page_data){
    $redirectURL = $view->fb_page_data['link'] . "?sk=app_" . $view->config['facebook_app_id'];
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
    <head>
        <title><?php echo $share_title; ?></title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta property="og:title" content="<?php echo $share_title; ?>" />
        <meta property="og:type" content="food" />        
        <meta property="og:image" content="<?php echo $view->settings['facebook_like_image_url']; ?>" />
        <meta property="og:site_name" content="<?php echo $share_title; ?>" />
        <meta property="fb:admins" content="<?php echo $view->config['facebook_admin_user_id']; ?>" />
        <meta property ="og:description" content="<?php echo $share_description; ?>" />
        <meta property="fb:app_id" content="<?php echo $view->config['facebook_app_id']; ?>" />
    </head>
    <body>              
        <script>
            window.location='<?php echo $redirectURL; ?>';
        </script>
        <center>
            <img src="<?php echo $view->settings['facebook_like_image_url']; ?>" />
        </center>
    </body>
</html>